package com.wangbo.rabbit;

import com.wangbo.rabbit.util.JacksonUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class RabbitConsumer {

//    @RabbitListener(queues = Constant.DIRECT_QUEUE_NAME)
//    public void messageHandler(String msg) {
//        RabbitMessage rabbitMessage = JacksonUtil.toBean(msg, RabbitMessage.class);
//        log.info("收到队列消息：messageId={}, payload={}", rabbitMessage.getMessageId(), rabbitMessage.getPayload());
//    }
}
